❓ Всё на sealed, или старый добрый interface + impl?
С выходом Java 21 в стабильный релиз sealed-типы наконец-то стали полноценным инструментом. Формально они позволяют явно ограничивать наследование, делают модель более предсказуемой и защищённой.
Казалось бы — бери и используй везде, особенно там, где важна неизменность и контроль, как в DDD, CQRS или API-слоях.
Но в реальности мнения расходятся. Одни начинают всё новое писать через sealed, чтобы убрать "лишнюю гибкость", другие придерживаются старого доброго interface + impl, ссылаясь на читаемость, тестируемость и простоту изменений.
💬 Вопрос к вам:
Sealed — это реальный шаг вперёд в проработке модели, или ненужный контроль там, где раньше всё было гибко и понятно?
❓ Всё на sealed, или старый добрый interface + impl?
С выходом Java 21 в стабильный релиз sealed-типы наконец-то стали полноценным инструментом. Формально они позволяют явно ограничивать наследование, делают модель более предсказуемой и защищённой.
Казалось бы — бери и используй везде, особенно там, где важна неизменность и контроль, как в DDD, CQRS или API-слоях.
Но в реальности мнения расходятся. Одни начинают всё новое писать через sealed, чтобы убрать "лишнюю гибкость", другие придерживаются старого доброго interface + impl, ссылаясь на читаемость, тестируемость и простоту изменений.
💬 Вопрос к вам:
Sealed — это реальный шаг вперёд в проработке модели, или ненужный контроль там, где раньше всё было гибко и понятно?
That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.
At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?
Библиотека джависта | Java Spring Maven Hibernate from de